
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module simpleparse.examples.lisp</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="simpleparse.html"><font color="#ffffff">simpleparse</font></a>.<a href="simpleparse.examples.html"><font color="#ffffff">examples</font></a>.lisp</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/mcfletch/pylive/simpleparse/examples/lisp.py">/home/mcfletch/pylive/simpleparse/examples/lisp.py</a></font></td></tr></table>
    <p><tt>Basic&nbsp;LISP&nbsp;parser<br>
&nbsp;<br>
We&nbsp;use&nbsp;library&nbsp;items,&nbsp;so&nbsp;we&nbsp;get&nbsp;"&nbsp;strings,&nbsp;float,&nbsp;int,&nbsp;and&nbsp;hex<br>
atoms,&nbsp;as&nbsp;well&nbsp;as&nbsp;lists.&nbsp;&nbsp;Note:&nbsp;Lisp&nbsp;doesn't&nbsp;seem&nbsp;to<br>
use&nbsp;","&nbsp;for&nbsp;seperating&nbsp;atoms&nbsp;in&nbsp;lists?&nbsp;&nbsp;I&nbsp;don't&nbsp;really<br>
remember&nbsp;it&nbsp;well&nbsp;enough&nbsp;to&nbsp;recall,&nbsp;but&nbsp;seems&nbsp;to&nbsp;match&nbsp;the<br>
samples&nbsp;I&nbsp;see.<br>
&nbsp;<br>
Note:&nbsp;Original&nbsp;grammar&nbsp;was&nbsp;from&nbsp;a&nbsp;sample&nbsp;in&nbsp;the&nbsp;YAPPS<br>
documentation.&nbsp;&nbsp;Though&nbsp;it's&nbsp;kinda&nbsp;hard&nbsp;to&nbsp;recognise&nbsp;here.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="simpleparse.common.numbers.html">simpleparse.common.numbers</a><br>
</td><td width="25%" valign=top><a href="simpleparse.common.strings.html">simpleparse.common.strings</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>definition</strong> = '<font color="#c040c0">\n</font>### A simple LISP parser<font color="#c040c0">\n\n</font>&lt;ts&gt;        := [ <font color="#c040c0">\\</font>t<font color="#c040c0">\\</font>n...q?, ")"!<font color="#c040c0">\n</font>&gt;seq&lt;       := ts, atom, (ts,atom)*, ts<font color="#c040c0">\n</font>'<br>
<strong>parser</strong> = &lt;simpleparse.parser.Parser instance&gt;</td></tr></table>
</body></html>